Method of printing on both sides of a sheet with data resending following a jam and an apparatus for use therewith

ABSTRACT

A printing control method causes the printer to print data of even pages on one side of respective recording media; causes the printer to print data of odd pages to be printed on the recording medium except for the last page of it is an odd page, having print data of one of even and odd pages printed on one side to the printing means, detecting a jam on the printing means, designating the pages to be printed on both sides of recording medium which is lost due to the jam, when the jam is detected during printing of print data of another of even and odd pages by the printing means, outputting print data of one of designated pages to be printed on one side of a newly supplied recording medium to the printing means, prompting the operator to set the recording medium having print data of one of the designated pages recorded on one side thereof to the sheet feeding means, and outputting print data of another of the designated pages to be printed on another side of the recording medium having print data of one of the designated pages recorded on one side to the printing means.

This is a divisional application of Ser. No. 09/061,877, filed on Apr.17, 1998, which is a divisional of U.S. application Ser. No. 08/506,026,filed on Jul. 24, 1995, now U.S. Pat. No. 5,790,766, issued Aug. 4,1998.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to a method of printing on both sides ofsheet without using a both side printing mechanism and an apparatus foruse therewith.

2. Related Background Art

In order to perform the both side printing with an image output device,the printing of odd pages and the printing of even pages are separatelyperformed. Namely, there is a method (so-called a manual both sideprinting) in which the printing of odd (or even) page is first performedon one side of a sheet, the operator reverses the sheet of one sideprinted paper and sets it on a sheet supply cassette of a printer, andsubsequently the printing of even number (or odd number) page isperformed on the other side of the sheet. Also, another method to obtainthe both side recorded matter involves using a printer with a both sideprinting mechanism (e.g., a sheet reversing mechanism).

However, with the above conventional method, a both side printingmechanism such as a sheet reversing mechanism for printing the back sideafter printing the front side is needed, and to effect an appropriaterecovery from the paper jam, it is necessary to hold data of the frontand back sides in a memory inside the printer, which requires a largercapacity of memory than normally used. Therefore, there is a drawbackthat the apparatus is more expensive.

Also, in the above former method, after printing one face of sheet, ifthe paper jam occurs in printing the other side, the recovery from thepaper jam can not be appropriately performed since the data printed onone face of jammed paper can not be reproduced.

SUMMARY OF THE INVENTION

It is an object of the present invention to provide an image outputmethod and an apparatus for use therewith which is capable of readilyeffecting an appropriate recovery from the paper jam in the both sideprinting, using a printer without having a both side printing mechanism.

To accomplish the above object, the present invention is characterizedby comprising memory means for storing print data, paper jam detectingmeans for detecting an occurrence of paper jam in a printer, print enddetecting means for detecting that the printing of one page is ended inthe printer, page location detecting means for detecting the location inthe memory means for each page of print data stored in the memory means,selective page printing means for selectively outputting print datastored in the memory means to the printer in a unit of page, printingpage instructing means for classifying the pages of print data stored inthe memory means into two groups of front and back, and instructing theselective page printing means to output data of each group to theprinter, and paper jam recovery means for instructing the selective pageprinting means to output print data of at least one side of a sheetwhere paper jam has occurred to the printer, when paper jam is detectedby the paper jam detecting means.

To accomplish the above object, the present invention is characterizedby further comprising paper jam detecting means for detecting anoccurrence of paper jam in a printer, page location detecting means fordetecting the location in the memory means for each page of print datastored in the memory means, selective page printing means forselectively outputting print data stored in the memory means to theprinter in a unit of page, printing page instructing means forclassifying the pages of print data stored in the memory means into twogroups of front and back, and instructing the selective page printingmeans to output data of each group to the printer, paper jam page numberinput means for inputting the page number at which paper jam hasoccurred, and paper jam recovery means for instructing the selectivepage printing means to output print data of at least one side of a sheetcorresponding to the page number to the printer, as well as receivingthe page number from the paper jam page number input means, when paperjam is detected by the paper jam detecting means.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram showing the functional configuration of anoutput device according to a first example of the present invention.

FIG. 2 is a block diagram showing the specific configuration of the sameexample.

FIG. 3 is a view showing a display screen of the same example.

FIG. 4 is a view showing a display screen of the same example.

FIG. 5 is a view showing a display screen of the same example.

FIG. 6 is a view showing a display screen of the same example.

FIG. 7 is a view showing a display screen of the same example.

FIG. 8 is a view showing the sheet path of printer in the same example.

FIGS. 9A and 9B are flowcharts for explaining a program of the sameexample.

FIG. 10 is a flowchart for explaining a program of the same example.

FIG. 11 is a flowchart for explaining a program of the same example.

FIG. 12 is a flowchart for explaining a program of the same example.

FIG. 13 is a block diagram showing the functional configuration of anoutput device according to a second example of the present invention.

FIG. 14 is a view showing a display screen of the same example.

FIGS. 15A and 15B are flowcharts for explaining a program of the sameexample.

FIG. 16 is a flowchart for explaining a program of the same example.

FIG. 17 is a flowchart for explaining a program of the same example.

FIG. 18 is a view illustrating a printer to which this example isapplicable.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

The preferred embodiments of the present invention will be describedbelow with reference to the drawings.

EXAMPLE 1

FIG. 1 is a block diagram for explaining the functional configuration ofan image output device according to an example of the present invention.In the figure, 1 is an application such as a word processor or a tablecalculation, which produces print data by converting the document ortable data into print data.

2 is a spooler for storing print data produced by the application 1 in atemporary file 3. The temporary file 3 stores print data output from thespooler 2. A printer setting dialog 4 designates the both side print. Adriver 5 outputs a DATA signal 6 as print data input from the temporaryfile 3 to a printer 7, and upon receiving an END signal 8 and a JAMsignal 9 from the printer 7, performs a respective predeterminedprocessing. Also, when the both side print is designated by the printersetting dialog 4, the both side printing process is performed.

The DATA signal 6 is print data output from the driver 5 which is passedto the printer 7. The printer 7 is a page printer such as a laser beamprinter, for printing each page by receiving print data (DATA signal 6)which the driver 5 outputs. If the printing of one page is completed,the printer 7 outputs an END signal 8. Also, when paper jam occursduring printing, a JAM signal 9 is issued.

FIG. 2 is a block diagram showing the specific configuration of thisexample. In the figure, 12 is a keyboard for delivering a key code to aCPU 14 upon the depression of a key. 13 is a host computer containing aCPU (Central Processing Unit) 14, a ROM (Read Only Memory) 15, a RAM(Random Access Memory) 16, and a magnetic disk 17. The CPU 14 isconnected to the keyboard 12, the ROM 15, the RAM 16, the magnetic disk17, a display unit 18, and a printer 19 (corresponding to the printer 7in FIG. 1). The CPU 14 controls the whole of the image output device inaccordance with a program memorized in the ROM 15, or a programtemporarily memorized in the RAM 16.

The ROM 15 memorizes the programs to be executed by the CPU 14. The RAMmemorizes temporarily a program which is stored in the magnetic disk 16.The RAM 16 memorizes data such as a document or a table which theapplication 1 processes and the working variables necessary for theexecution of program memorized in the ROM 15 or RAM 16.

The magnetic disk 17 stores the program codes for the application 1, thespooler 2, the printer setting dialog 4, the driver 5, and an operatingsystem (not shown), which the computer can read. These program codes maybe loaded from a floppy disk or a CD-ROM to the magnetic disk 17. Themagnetic disk 17 also stores the character fonts for use in the displayon the display unit 18 or the printing with the printer 19. The magneticdisk 17 also stores a temporary file 3 as will be described later. Thedisplay unit 18 makes the display in accordance with a program of theCPU 14.

FIG. 18 is a typical mechanical view illustrating the printer 19. In thesame figure, 201 is a printer housing, and 202 is an operation panel.The operation panel 202 has a switch for the operation and an LEDdisplay. 203 is an accommodating portion of a control board foreffecting the print process control for the printer. 210 is a papercassette for storing the sheets, having a mechanism for electricallysensing the paper size by means of a diaphragm, not shown. 211 is acassette paper supply clutch, consisting of a cam for separating themost upper one of the sheets laid on the paper cassette 210, to allowthe separated sheet to be transported to a paper supply roller 212 bydriving means, not shown, which is intermittently rotated every time ofthe paper supply to supply one sheet at each rotation. 214 is a resistshutter for registrating the sheet to stop the supply of sheet. Thepaper supply roller 212 brings the leading end of sheet to the resistshutter 214. 219 is a manual insertion tray and 215 is a manualinsertion paper supply roller. The paper supply roller 215 separates themost upper one of the sheets when a plurality of sheets are laid in themanual insertion tray 219, and brings the leading end of sheet to theregistration shutter 214. With the above constitution, a sheet can beselectively supplied from either the paper cassette 210 or the manualinsertion paper supply tray 219.

The printer 19 determines paper supply means from among the cassette andthe manual insertion tray 219, upon an instruction from the hostcomputer 13, which then starts the paper supply as above described, upona print start instruction, to convey the sheet to the registrationshutter 214. 204 is a cartridge having a photosensitive drum 205 and atoner holder, not shown. 206 is a laser driver, 207 is a rotationalpolygon mirror, 208 is a reflection mirror, and 209 is a beam detector.If the sheet is conveyed to the registration shutter 214, the laserdriver effects the on/off driving of a semiconductor laser, not shown,in accordance with print data sent from the host computer 13. A laserbeam emitted from this semiconductor laser is scanned in a main scandirection by the rotational polygon mirror 207, and led via thereflection mirror onto the photosensitive drum 205, where it is imagedto form a latent image on the main scan line by the scanning in the mainscan direction. The registration shutter 214 is driven upwardsynchronously with the emission of laser beam, to synchronize theconveyance of the sheet with the sub-scanning of the laser beam. Thebeam detector 209 provided in place in starting the scanning of thelaser beam forms a synchronizing signal for determining the timing forwriting out image in the main scan direction by detecting the laserbeam. Thereafter, the sheet is conveyed by a conveying roller 213, thephotosensitive drum is driven for rotation by a motor, not shown, tovisualize data as a toner image by a developing unit 220, which tonerimage is transferred onto the sheet. The sheet to which the toner imageis transferred, after the toner image is heated and fixed by a fixingroller 216, is then passed via the conveying roller 217 and exhaustedinto a paper exhausting tray of the printer housing by a paperexhausting roller 218.

As will be clear from FIG. 18, there is not provided a both sideprinting mechanism such as a mechanism for reversing the sheet in theprinter 19.

Next, the outline of a printing procedure in this example will bedescribed. If the application 1 accepts an instruction for printing,data such as, e.g., a document or table which the application 1processes is converted into a page description language which is a printcommand for the printer 19, which is then sent to the spooler 2.

The spooler 2 creates a temporary file 3 in the magnetic disk 17 forstoring the page description language sent from the application 1. Thespooler 2 initiates the driver 5, if the page description language sentfrom the application 1 has been totally stored.

If the printer setting dialog 4 is initiated, a screen as shown in FIG.3 appears on the display unit 18. In the figure, 21 is a check mark,which is indicated by the printer setting dialog 4, when the both sideprinting is effectively set. If the printer setting dialog 4 isinitiated, and the screen as shown in FIG. 3 appears, the effectivestate of both side print is toggled every time a space key is enteredfrom the keyboard 12. If a line feed key is entered from the keyboard12, the printer setting dialog 4 terminates the processing, theeffective state of both side printing finally set is memorized into theworking variable contained in the RAM 16.

If the driver 5 is initiated by the spooler 2, the single side print orthe both side print is performed in accordance with the effective stateof both side print preset by the printer setting dialog 4. If the bothside print is set to be ineffective, the driver 5 sends a pagedescription language stored in the temporary file 3 as the DATA signal 6to the printer 7. If data corresponding to one page has been sent, itwaits for an END signal 8 to be received. If the END signal 8 isreceived, the driver 5 sends data corresponding to the next one page,and also waits for an END signal 8 to be received. In this way, theprocessing continues until the page description language stored in thetemporary file 3 has been totally sent, then the temporary file 3 isdeleted and the processing is ended.

When a JAM signal 9 is received, the driver 5 displays a screen as shownin FIG. 4, and prompts the operator to release the paper jam. If theoperator releases the paper jam and enters a line feed key, the driverresends the data corresponding to a page where the paper jam hasoccurred. It should be noted that the printer 7 is configured to hold nodata for the page where the paper jam has occurred. The driver 5 makesthe recovery of paper jam in this way, and then continues the processingin the same manner as if no paper jam occurs.

When the both side print is effectively set, the driver 5 sends onlydata corresponding to the even page to the printer 7 in accordance withthe same procedure as the single side print as above described. If a JAMsignal 9 is received during printing of the even page, the processing isperformed in accordance with the same procedure as the single side printas above described. If all the printing for the even page is completed,the driver 5 displays a screen as shown in FIG. 5. If the operator setsthe sheets of one side printed paper for the even page to the cassetteof the printer 7 upon an instruction of the screen, and enters a linefeed key, the driver 5 sends only data corresponding to the odd page tothe printer 7. If the JAM signal 9 is received during printing of theodd page, a processing that is different from that of the single sideprint as above described is performed. If the JAM signal is receivedafter the transmission of data corresponding to one page, the driver 5displays a screen as shown in FIG. 6.

If the operator releases the paper jam, sets a clean sheet of paper tothe cassette, and enters a line feed key, the driver 5 sends datacorresponding to the even page of a sheet where the paper jam hasoccurred to the printer 7 in accordance with the same procedure as thesingle side print as above described. If the printing of one page isended, the driver 5 displays a screen as shown in FIG. 7. If theoperator sets in the cassette the sheet of even page printed paper wherethe paper jam has occurred upon an indication on the screen, and entersa line feed key, the driver starts the transmission of datacorresponding to the odd page of the sheet where the paper jam hasoccurred. Thereafter, the same processing as if no paper jam occurs iscontinued.

Where the total number of pages is 5, for example, the number of oddpages is one page greater than that of even pages. In this case, thedriver 5 does not print a page following the last page, and prints onlytwo pages, for example, the second and fourth pages. In printing the oddpage, the first and third pages are printed on the sheets where thesecond and fourth page have been printed on the back side, and the fifthpage is printed on a clean sheet of paper lying underneath. The driver 5sends data in accordance with the procedure of the single side print asabove described, if the last page is an odd page.

It is to be noted that the printer 7 has a sheet path 24, as shown inFIG. 8 in this example, to print on the lower face of sheet within thecassette 2, the sheet being exhausted with the printed side downward.Therefore, by printing both the even page and the odd page in ascendingorder during the both side printing, the print output ordered in correctpage sequence can be obtained. In the figure, 22 is a cassette(corresponding to 210 in FIG. 18), 23 is a photosensitive drum(corresponding to 205 in FIG. 18), and 24 is a sheet path.

Next, a program for the driver 5 will be described in detail withreference to the flowchart. It is noted in the following descriptionthat a both side print register DUP, a page number register PAGE, a pageposition table POS, a last page number register LAST, and page headregisters HEAD1 and HEAD2 are arranged on the RAM 16.

FIGS. 9A and 9B are flowcharts showing the overall printing process forthe driver 5. If the driver 5 is driver 5 is initiated, the temporaryfile 3 is opened at step S1, and the both side print register DUM isexamined at step S2. If the both side print is set ineffective, the bothside print register DUP has been set to 0 by the print setting dialog 4,and the operation proceeds to the printing process of one page on onlyone side (hereinafter referred to as a front side one page printingprocess) at step S3. At step S3, the page description language stored inthe temporary file 3 is read and data of one page is output to theprinter 7, as will be described later. If the printing of one page isended, a check is made to see whether or not the temporary file 3reaches the end of file at step S4. If the end of file is not reached,the operation returns to step S3 to print the next one page. In thisway, if the printing of all the pages is completed, the operationproceeds from step S4 to step S5 to close the temporary file 3, becausethe temporary file 3 reaches the end of file. At step S6, the temporaryfile 3 is deleted, and the processing is ended.

If the both side print is set to be effective, the both side printregister DUP is set to 1 by the print setting dialog 4, and theoperation proceeds from step S2 to step S7, where all the pagedescription language stored in the temporary file 3 is read and the filelocation corresponding to the top of each page is recorded in the pageposition table POS, as will be described later. The page position tablePOS is of an arrangement indexed by the page number, and if the pagenumber is PAGE, the file pointer stored is represented as a POS[PAGE].At step S7, the last page number is stored in the last page numberregister LAST.

Then, at step S8, “2” is stored into the page number register PAGE.Then, at step S9, the page number register PAGE and the last page numberregister LAST are compared. If PAGE≦LAST, the printing of even page isnot ended, and therefore the operation proceeds to step S10, where thefile pointer of the temporary file 3 is set to POS[PAGE], that is, thefile location corresponding to the top of page corresponding to the pagenumber PAGE stored in the page position table POS. Thereby, thesubsequent reading from the temporary file 3 occurs in sequence from theset file pointer.

Then, the operation proceeds to the front side one page print(hereinafter described) at step S11 to output data of one page to theprinter 7. If the printing of one page is ended, “2” is added to thepage number register PAGE at step S12, and the operation returns to stepS9. In this way, if all the printing of even page is ended, PAGE>LASTresults, and the operation proceeds from step S9 to step S13 to displaya dialog as shown in FIG. 5. If a line feed key is entered “1” is storedin the page number register PAGE at step S14.

Then, at step S15, the page number register PAGE and the last pagenumber register LAST are compared. If PAGE≦LAST, the printing of oddpage is not ended, and therefore the operation proceeds to step S16,where the file pointer of the temporary file 3 is set to POST[PAGE].

Then, at step S17, the page number register PAGE and the last pagenumber register LAST are compared. If PAGE≠LAST, the page is not last,and therefore the operation proceeds to the printing process for otherside one page (hereinafter referred to as a back side one page printingprocess) at step S18, as will be described later, to output data of onepage to the printer 7. If the printing of one page is ended, “2” isadded to the page number register PAGE at step S19, and the operationreturns to step S15.

In this way, the printing of odd page is repeated. If the number ofpages is even, the operation proceeds from step S15 to step S5, afterprinting of the last page. If the number of pages is odd, PAGE=LASToccurs at step S17, immediately before the last page, and therefore theoperation proceeds to the front side one page printing at step S20 toprint the last page, and proceeds to step S5.

FIG. 10 is a flowchart showing the details of front side one pageprinting process at steps S3, S11, and S20 in FIGS. 9A and 9B. If thefront side one page printing process is called, the current value of thefile pointer for the temporary file 3 is first stored in the page headregister HEAD1 at step S31. Then, at step S32, a check is made to seewhether or not the temporary file 3 reaches the end of file. If the endof file is not reached, the page description language stored is readfrom the temporary file 3 at step S33, and data is sent with the DATAsignal 6 to the printer 7 at step S34.

Then, at step S35, the end of one page is checked. Since the data readfrom the temporary file 3 is the page description language in thisexample, it can be readily checked by analyzing the page descriptionlanguage which has been read in. If the end of one page is not true, theoperation returns to step S32 to continue the processing. If the end ofone page is true and the end of file is reached at step S32, theoperation proceeds to step S36 to wait for the end of print.

If an END signal 8 is received at step S36, the processing is endedsince the printing has been ended. If the END signal 8 is not received,the operation proceeds to step S37. If a JAM signal 9 is not received,the operation returns to step S36 to wait for the END signal 8 or JAMsignal 9 to be received.

If the JAM signal 9 is received at step S37, a dialog as shown in FIG. 4is displayed at step S38. If a line feed key is entered, the operationproceeds to step S39, where the file location stored in the page headregister HEAD1 at step S31, that is, the head position of a pagecurrently being printed is set to the file pointer of the temporary file3.

Then, the operation returns to step S32 to send data of the pagecurrently being printed to the printer 7 again. It is noted that sincethe printer 7 holds no data of a page where the paper jam has occurred,as previously described, it is necessary to send the data again.

FIG. 11 is a flowchart showing the details of a table generation processat step S7 as shown in FIG. 9. If the table generation process iscalled, “1” is stored in the page number register PAGE at step S51.Then, the operation proceeds to step S52, where the current value of thefile pointer for the temporary file 3 or the top position of the page isstored in the page position table POS[PAGE]. Then, at step S53, a checkis made to determine whether or not the temporary file 3 reaches the endof file. If the end of file is not reached, the page descriptionlanguage stored is read from the temporary file 3 at step S54, and theend of one page is checked at step S55.

This check is performed in the same manner as that at step S35 as shownin FIG. 10. If the end of one page is not true, the operation returns tostep S53 to continue the processing. If the end of one page is true andthe end of file is reached at step S53, the operation proceeds to stepS56, where “1” is added to the page number register PAGE. Then, at stepS57, a check is made to determine whether or not the temporary file 3reaches the end of file. If the end of file is not reached, theoperation returns to step S52 for further processing of the next page.If the end of file is reached, the current value of the file pointer forthe temporary file 3 is stored in the page position table POS[PAGE] atstep S58. This corresponds to the last location of data in the lastpage.

Then, at step S59, the page number register PAGE minus “1”, i.e., thelast page number, is stored in the last page number register LAST, andthe processing is ended. It is noted that if the data stored in thetemporary file 3 is empty in the above program. “1” is stored in thelast page number register LAST. It is correct that “0” is stored, butsince empty data is not stored by the spooler 2 in this example, thissituation (empty data) will not occur.

FIG. 12 is a flowchart showing the details of a both side one pageprinting process at step S18 as shown in FIG. 19B. If the both side onepage process is called, the current value of the file pointer for thetemporary file 3 is first stored in the head register HEAD2 at step S71.

Then, at steps S72 to S77, the data transmission to the printer 7, andthe print wait after the end of data transmission of one page occur.These processings are identical to those at steps S32 to S37 in FIG. 10.If an END signal 8 is received at step S76, the processing is ended.

If a JAM signal 9 is received at step S77, a screen as shown in FIG. 6is displayed at step S78. If a line feed key is entered, the operationproceeds to step S79, where the file location stored in the pageposition table POS[PAGE+1], i.e., the top position of a page next to onecurrently being printed, is set to the file pointer of the temporaryfile 3.

Then, the printing of even page printed in the back of a page where thepaper jam has occurred is performed in the front side one page printingprocess at step S80. This processing is identical to that as shown inFIG. 10. Then, at step S81, a screen as shown in FIG. 7 is displayed. Ifa line feed key is entered, the operation proceeds to step S82, wherethe file location stored in the page head register HEAD2, i.e., the topposition of a page currently being printed, is set to the file pointerfor the temporary file 3 at step S71. Then, returning to step S72, dataof the page currently being printed is sent to the printer 7 again.

While in the above example the page at which the paper jam has occurredis subjected to the both side printing immediately after the paper jamhas occurred, it should be noted that alternatively, other methods maybe conceived that, for example, the odd page is only printed when thepaper jam occurred, and thereafter the even page is collectivelyprinted, or the printing for the recovery is not performed when thepaper jam occurred, and then the both side printing is collectivelyperformed later.

Next, a variation of the above example 1 will be described about onlydifferent points from the example 1.

In the variation, when the operation transfers from step S9 to step S13in FIGS. 9A and 9B (when the printing of even page is ended), a messageappearing at step S13 is “PLEASE SET ALL SHEETS OF ONE SIDE PRINTEDPAPER TO MP TRAY”, instead of the message as shown in FIG. 5. Herein, MPtray indicates a manual insertion tray 219.

And if a line feed key is entered, the driver 5 (host computer 13) sendsa command for switching paper feeding means from the paper cassette 210to the manual insertion tray 219 to the printer 19, and the operationproceeds to step S14. Accordingly, the operator sets a sheet of evenpage printed paper to the MP tray 219, and enters a line feed key on thekeyboard 12, an image of the odd page is printed on the sheet suppliedfrom the MP tray 219.

Note that the operation when the paper jam occurs during printing of oneside or even page is the same as in the example 1.

If the paper jam occurs during printing of odd page (when the operationtransfers from step S77 to step S78 in FIG. 12), a message as shown inFIG. 4, but not in FIG. 6, appears, and a command for switching papersupply means from the MP tray 219 to the paper cassette 210 is sent tothe printer 19.

Accordingly, an image of even page at step S80 is printed on a sheetsupplied from the paper cassette 210. If the printing at step S80 isended, a message appearing at step S81 is “PLEASE SET ONE SIDE PRINTEDSHEET OF PAPER TO TOP OF MP TRAY”, instead of the message as shown inFIG. 7. And if a line feed key is entered, the driver 5 (host computer13) sends a command for switching paper feeding means from the papercassette 210 to the manual insertion tray 219 to the printer 19, and theoperation proceeds to step S82.

Further, in this variation, if the judgment at step S17 is affirmative(before starting the printing of last odd page if the number of pages tobe printed is odd), the driver 5 (host computer 13) sends a command forswitching paper feeding means from the manual insertion tray 219 to thepaper cassette 210 to the printer 19. Accordingly, an image of last oddpage is printed on the sheet supplied from the paper cassette 210.

While in the above examples the sheet from within the cassette isprinted on the lower face, and exhausted with the printed side downward,other printers may be used in which the sheet from the cassette may beprinted on the upper face, and/or exhausted with the printed sideupward. In this case, to retain the page sequence of printed results,the printing may occur in a different order from the above examples. Forexample, when using a printer for printing on the upper face of sheetwithin the cassette and exhausting the sheet with the printer sidedownward, the page sequence of printed results can be reversed byprinting the even page in descending order and the odd page in ascendingorder.

Also, the data of a page where the paper jam has occurred is not held inthe above examples, but alternatively, other printers for holding thedata of the page where the paper jam has occurred may be used. In thiscase, by deleting the page where the paper jam has occurred and whosedata is held within the printer, upon a hardware signal or a softwarecommand, the processing can be performed in accordance with the sameprocedure as in the above example, or a procedure of immediatelyprinting the page of the sheet where the paper jam has occurred andwhose data is held within the printer.

Also, while in the above examples the page description language is usedas print data, it is to be noted that any print data may be employed.Also, while the generation of the temporary file is made by the spooler,and the reading and deletion is made by the driver in the aboveexamples, it is to be noted that other methods may be used, in which forexample, no spooler exists and the driver generates the temporary file,or the spooler deletes the temporary file, or the driver performs thereading using a subroutine provided by the spooler, a permanent file isused instead of the temporary file and without deletion.

Also, in the above examples, the application creates the print data, andthe spooler receives and writes data to generate the temporary file, butalternatively, any other methods may be used. Also, in the aboveexamples, the print data stored in the temporary file is output to theprinter without conversion, but alternatively, the driver may convertthe print data stored in the temporary file into the printer language tobe output to the printer.

Also, in the above examples, when the number of pages to be printed isodd, no extra page is printed, but alternatively, when the number ofpages is odd, extra one page may be printed as a blank sheet. However,it takes more time to print one page for the blank sheet. Also, in theabove examples, the generation of the page position table is first madecollectively in both side printing, but alternatively, it may be made insequence during the printing of even page.

Also, in the above examples, the end of page is detected by analyzingthe print data during printing, but alternatively, the end of page maybe judged as the top position of the next page by referring to the pageposition table. Also, in the above examples, a page printer was used,but alternatively, any other printers may be used. Also, the END signaland the JAM signal may be on the independent signal line, or sent as thestatus data via a bi-directional interface such as RS232C, IEEE, orP1284.

EXAMPLE 2

Referring now to FIGS. 13 to 17, an example 2 will be described below.In FIG. 13, an application 1, a spooler 2, a temporary file 3, a printersetting dialog 4, a DATA signal 6, and a JAM signal 9 are the same asthose of the example 1. 10 is a driver for outputting the DATA signal 6as print data input from the temporary file 3 to a printer 11, and uponreceiving the JAM signal 9, performing a predetermined processing. Also,when the both side print is designated by the printer setting dialog 4,the both side printing process is performed.

The printer 11 is a page printer such as a laser beam printer, forprinting each page by receiving print data which the driver 10 outputsthrough the DATA signal 6. Also, when the paper jam occurs duringprinting, a JAM signal 9 is issued. A specific configuration of theexample 2 is equivalent to that of the example 1 and shown in FIGS. 2and 18.

Next, the outline of a printing procedure in this example 2 will bedescribed. A program of this example 2 is only different in the driver10 from that of the example 1. If the driver 10 is initiated by thespooler 2, the single side print or the both side print is performed inaccordance with the effective state of both side print preset by theprinter setting dialog 4. If the both side print is set to beineffective, the driver 10 sends a page description language stored inthe temporary file 3 through the DATA signal 6 to the printer 11.

The processing continues until all the page description language storedin the temporary file 3 has been sent, and if all the transmission hasbeen completed, then the temporary file 3 is deleted and the processingis ended. If a JAM signal 9 is received, the driver 10 displays a screenas shown in FIG. 4, prompting the operator to release the paper jam. Ifthe operator releases the paper jam and enters a line feed key, thedriver 10 resumes the transmission of data. It should be noted that theprinter 11 is configured to hold data of the page at which the paper jamhas occurred, and reprint that page at which the paper jam has occurred.The driver 10 makes the recovery of paper jam in this way, and thencontinues the processing in the same manner as if no paper jam occurs.

When the both side print is effectively set, data corresponding to theeven page is sent to the printer 7 in accordance with the same procedureas the single side print as above described. If all the printing for theeven page is completed, the driver 10 displays a screen as shown in FIG.5. If the operator sets the sheets of one side printed paper for theeven page to the cassette of the printer 11 upon an indication on thescreen, and enters a line feed key, the driver 10 sends datacorresponding to the odd page to the printer 11. The procedure herein isdifferent from that of the single side print as above described, onlywhen the JAM signal 9 is received.

If a JAM signal 9 is received, the driver 10 displays a screen as shownin FIG. 6. If the operator releases the paper jam, sets a clean sheet ofpaper to the cassette, and enters a line feed key, a screen as shown inFIG. 14 appears. If the operator inputs the page number at which thepaper jam has occurred, and enters a line feed key, the printer performsthe reprinting of that page where the paper jam has occurred.

If the printing of all the pages is ended, the page at which the paperjam has occurred and the number of which is entered by the operator issubjected to both side printing. If the operator changes that page byinserting the reprinted page, the complete printed results can beobtained. Note that since the END signal 8 as shown in FIG. 1 does notexist in this example, the page at which the paper jam has occurred cannot be detected.

Next, a program for the driver 10 will be described in detail withreference to the flowchart. It is noted in the following descriptionthat a both side print register DUP, a page register PAGE, a pageposition table POS, a print table PT, a last page number register LAST,and page head registers HEAD1 and HEAD2 are arranged on the RAM 16.

FIGS. 15A and 15B are flowcharts showing the overall printing processfor the driver 10. If the driver 10 is initiated, the temporary file 3is opened at step S101, and the both side print register DUM is examinedat step S102. If the both side print is set ineffective, 0 is set in theboth side print register DUP by the print setting dialog 4, andtherefore the operation proceeds to the front side one page printingprocess at step S103. At step S103, the page description language storedin the temporary file 3 is read and data of one page is output to theprinter 10. If the printing of one page is ended, a check is made todetermine whether or not the temporary file 3 reaches the end of file atstep S104. If the end of file is not reached, the operation returns tostep S103 to print the next one pages. In this way, if the printing ofall the pages is completed, the operation proceeds from step S4 to stepS5 to close the temporary file 3, because the temporary file 3 hasreached the end of file. At step S106, the temporary file 3 is deleted,and the processing is ended.

If the both side print is set to be effective, 1 is set in the both sideprint register DUP by the print setting dialog 4, and the operationproceeds from step S102 to step S107, where all the page descriptionlanguage stored in the temporary file 3 is read and the file locationcorresponding to the top of each page is recorded in the page positiontable POS. The page table POS is of an arrangement indexed by the pagenumber, and if the page number is PAGE, the file pointer stored isrepresented as a POS[PAGE]. At step S107, the last page number is storedin the last page number register LAST.

Then, at step S108, the print page table PT is initialized. The printpage table PT is of an arrangement indexed by the page number, andassuming the page number as PAGE, the print page table corresponding toits page number is represented as a POS[PAGE]. The print page table hasa setting of 1 for the unprinted page, or 0 for the printed page.Herein, since all the pages are unprinted, PT[1] to PT[LAST] are all setto 1.

Then, at step S109, “2” is stored into the page number register PAGE.Then, at step S110, the page number register PAGE and the last pagenumber register LAST are compared. If PAGE≦LAST, the printing of evenpage is not ended, and therefore the operation proceeds to step S111 toinvestigate the print table PT[PAGE]. If PT[PAGE]=0, the printing hasbeen already finished, and the operation proceeds to step S115. IfPT[PAGE]=1, the printing has not been yet finished, and the operationproceeds to step S112, where the file pointer of the temporary file 3 isset to POS[PAGE], that is, the file location corresponding to the top ofpage corresponding to the page number PAGE stored in the page positiontable POS. Thereby, the subsequent reading from the temporary file 3occurs in sequence from the set file pointer. Then, “0” is set to theprint page table PT[PAGE] at step S113.

Then, the operation proceeds to the front side one page printing processat step S114 to output data of one page to the printer 11. If theprinting of one page is ended, “2” is added to the page number registerPAGE at step S115, and the operation returns to step S110. In this way,if all the printing of even page is ended, PAGE>LAST results, and theoperation proceeds from step S110 to step S116 to display a dialog asshown in FIG. 5. If a line feed key is entered, “1” is stored in thepage number register PAGE at step S117.

Then, at step S118, the page number register PAGE and the last pagenumber register LAST are compared. If PAGE≦LAST, the printing of oddpage is not ended, and therefore the operation proceeds to step S119 toinvestigate the print page table PT[PAGE]. If PT[PAGE]=0, the printinghas been already finished, and the operation proceeds to step S124. IfPT[PAGE]=1, the printing has not been yet finished, and the operationproceeds to step S120, where the file pointer of the temporary file 3 isset to POS[PAGE].

Then, at step S121, “0” is set to the print page table PT[PAGE]. Then,at step S117, the page number register PAGE and the last page numberregister LAST are compared. If PAGE≠LAST, the page is not last, andtherefore the operation proceeds to the back side one page printingprocess at step S123 to output data of one page to the printer 11. Ifthe printing of one page is ended, “2” is added to the page numberregister PAGE at step S124, and the operation returns to step S118.

In this way, the printing of odd page is repeated. If the number ofpages is even, the operation proceeds from step S118 to step S126, afterprinting of the last page. If the number of pages is odd, PAGE=LASToccurs at step S122, immediately before printing of the last page, andtherefore the operation proceeds to the front side one page printing atstep S125 to print the last page, and proceeds to step S126.

At step S126, a check is made to determine whether or not the print pagetable PT is all equal to “0”. Since “0” is set to the print tablePT[PAGE] of page to be printed at steps S113 and S121, it is all equalto “0” if no paper jam occurs during printing of the odd page, and theoperation proceeds to step S105. If the paper jam occurs in printing theodd page, “1” is set to both the odd page and the even page at which thepaper jam has occurred at step S134 in FIG. 16, as will be describedlater, and the operation returns to step S109 to reprint only the pageat which the paper jam has occurred.

FIG. 16 is a flowchart showing the details of the front side one pageprinting process at steps S103, S114, and S125 as shown in FIG. 15B. Atstep S131, a check is made to see whether or not the temporary file 3reaches the end of file. If not, the page description language stored isread from the temporary file 3 at step S132.

Then, proceeding to step S133, if a JAM signal 9 is received, a screenas shown in FIG. 4 is displayed at step S134. If a line feed key isentered, the operation proceeds to step S133. If the JAM signal 9 is notreceived at step S133, the operation proceeds to step S135, where datais sent to the printer 11 through the DATA signal 6.

Then, at step S135, the end of page is checked. Since the data read fromthe temporary file 3 is the page description language in this example,it can be readily judged by analyzing the read description language. Ifthe end of page is not reached, the operation returns to step S131 tocontinue the processing. If the end of one page is reached, theprocessing is ended.

FIG. 17 is a flowchart showing the details of the back side one pageprinting process at step S123 as shown in FIG. 15B. If the back side onepage printing process is called, a check is made to determine whether ornot the temporary file 3 has reached the end of file at step S151. Ifnot, the page description language stored is read from the temporaryfile 3 at step S152.

Then, proceeding to step S153, if a JAM signal 9 is received, a screenas shown in FIG. 6 is displayed at step S154. If a line feed key isentered, the operation proceeds to step S155, where a screen as shown inFIG. 14 is displayed. If the page number is input and a line feed key isentered, “1” is set to a page corresponding to the input number of theprint page table PT, and a back page thereof. Specifically, if the inputnumber P is odd, “1” is set to PT[P] and PT[PT+1], or if it is even, “1”is set to PT[PT−1] and PT[P]. Then, the operation returns to step S153.

If the JAM signal 9 is not received at step S153, the operation proceedsto step S156, where data is sent to the printer 11 through the DATAsignal 6. Then, at step S157, a check is made to determine whether ornot the end of page is reached. If the end of page is not reached, theoperation returns to step S151 to continue the processing. If the end ofpage is reached, the processing is ended.

As above described, according to the present invention, it is possibleto provide an output device which is capable of readily effecting theappropriate recovery of paper jam in the both side printing in themanner to reproduce data printed on the sheet where the paper jam hasoccurred, using a printer without having a both side printing mechanism.

While in the above examples 1 and 2, the sheet from within the cassetteis printed on the lower face, and exhausted with the printed sidedownward, other printers may be used in which the sheet from thecassette may be printed on the upper face, and/or exhausted with theprinted side upward. In this case, to retain the page sequence ofprinted results, the printing may occur in a different order from theabove examples. For example, when using a printer for printing on theupper face of sheet within the cassette and exhausting the sheet withthe printer side downward, the page sequence of printed results can bereserved by printing the even page in descending order and the odd pagein ascending order.

Also, the data of a page where the paper jam has occurred is not held inthe above examples, but alternatively, other printers for holding thedata of the page where the paper jam has occurred may be used. In thiscase, by deleting the page where the paper jam has occurred and whosedata is held within the printer, upon a hardware signal or a softwarecommand, the processing can be performed in accordance with the sameprocedure as in the above example, or a procedure of immediatelyprinting the page of the sheet where the paper jam has occurred andwhose data is held within the printer.

Also, while in the above examples the page description language is usedas print data, it is to be noted that any print data may be employed.Also, while the generation of the temporary file is made by the spooler,and the reading and deletion is made by the driver in the aboveexamples, it is to be noted that other methods may be used, in which forexample, no spooler exists and the driver generates the temporary file,or the spooler deletes the temporary file, or the driver performs thereading using a subroutine provided by the spooler, a permanent file isused instead of the temporary file and without deletion.

Also, in the above examples, the application creates the print data, andthe spooler receives and writes data to generate the temporary file, butalternatively, any other methods may be used. Also, in the aboveexamples, the print data stored in the temporary file is output to theprinter without conversion, but alternatively, the driver may convertthe print data stored in the temporary file into the printer language tobe output to the printer.

Also, in the above examples, when the number of pages to be printed isodd, no extra page is printed, but alternatively, when the number ofpages is odd, extra one page may be printed as a blank sheet. However,it takes more time to print one page for the blank sheet. Also, in theabove examples, the generation of the page position table is first madecollectively in both side printing, but alternatively, it may be made insequence during the printing of even page.

Also, in the above examples, the end of page is detected by analyzingthe print data during printing, but alternatively, the end of page maybe judged as the top position of the next page by referring to the pageposition table. Also, in the above examples, a page printer was used,but alternatively, any other printers may be used. Also, the END signaland the JAM signal may be on the independent signal line, or sent as thestatus data via a bi-directional interface such as RS232C, IEEE, orP1284.

Furthermore, in the above examples, the printing of next page is notstarted until the printing of one page is ended, but the printing ofnext page may be started before the printing of one page is ended. Inthat case, the printers 7, 11 recognize the sheet number which isdefective due to the jam (the page number which has been sent from thehost computer but abnormally printed), based on the jam detectiontiming. In the example 1, the data for such sheet number is sent fromthe printer 7 to the host computer (driver), which then resends data ofthe page preceded by the sheet number (which is different between thesingle side printing and the both side printing).

Also, in the example 2, when α sheets are defective due to the jam inthe back side printing, for example, the first page (odd) P which hasbeen lost due to the jam is entered from the keyboard, and PT[P] toPT[P+2xα−1] is set at 1.

The present invention is not limited to the above-described examples,but various variations may be made within the scope of the attachedclaims.

What is claimed is:
 1. A print data output method comprising: agenerating step of generating print data of a plurality of pages basedon document information; a storing step of storing the generated printdata; an outputting step of outputting the stored print data with aninstruction for duplex printing to a printer such that all print data ofeither one of even and odd pages in the plurality of pages are printedon one side of at least one recording medium and then all print data ofthe other of the even and odd pages are printed on the other side of theat least one recording medium; a detecting step of detecting a jam of arecording medium in printing the output print data; an obtaining step ofobtaining a page number for the recording medium of which said detectingstep detected jam; and a resending step of resending print data if it isdiscriminated from the obtained page number that print data have beenprinted on one side of the recording medium for the page numberresending the print data that have been already output to the printerthereby causing the resent print data to be printed on a recordingmedium for which no print data have been printed on either side.
 2. Amethod according to claim 1, wherein said detecting step detects the jambased on a signal received from the printer.
 3. A method according toclaim 1, wherein said obtaining step obtains said page number based on avalue entered by an operator.
 4. A method according to claim 1, furthercomprising an allowing step of allowing an operator to enter aninstruction for printing the document information and the instructionfor duplex printing.
 5. A print data output apparatus comprising: agenerating unit adapted for generating print data of a plurality ofpages based on document information; a memory unit adapted for storingthe print data generated by said generating unit; an output unit adaptedfor outputting the print data stored in said memory unit with aninstruction for duplex printing to a printer such that all print data ofeither one of even and odd pages in the plurality of pages are printedon one side of at least one recording medium and then all print data ofthe other of the even and odd pages are printed on the other side of theat least one recording medium; a detecting unit adapted for detecting ajam of a recording medium in printing the output print data; anobtaining unit adapted for obtaining a page number for the recordingmedium of which said detecting unit detected the jam; and a resendingunit adapted for resending print data if it is discriminated from theobtained page number that print data have been printed on one side ofthe recording medium for the page number resending the print data thathave been already output to the printer thereby causing the resent printdata to be printed on a recording medium for which no print data havebeen printed on either side.
 6. An apparatus according to claim 5,wherein said detecting unit detects the jam based on a signal receivedfrom the printer.
 7. An apparatus according to claim 5, wherein saidobtaining unit obtains said page number based on a value entered by anoperator.
 8. An apparatus according to claim 5, further comprising anallowing unit adapted for allowing an operator to enter an instructionfor printing the document information and the instruction for duplexprinting.
 9. A memory medium having thereon computer readable programcode for performing the steps of: a generating step of generating printdata of a plurality of pages based on document information; a storingstep of storing the generated print data; an outputting step ofoutputting the stored print data with an instruction for duplex printingto a printer such that all print data of either one of even and oddpages in the plurality of pages are printed on one side of at least onerecording medium and then all print data of the other of the even andodd pages are printed on the other side of the at least one recordingmedium; a detecting step of detecting a jam of a recording medium inprinting the output print data; an obtaining step of obtaining a pagenumber for the recording medium of which said detecting step detectedjam; and a resending step of resending print data if it is discriminatedfrom the obtained page number that print data have been printed on oneside of the recording medium for the page number resending the printdata that have been already output to the printer thereby causing theresent print data to be printed on a recording medium for which no printdata have been printed on either side.
 10. A memory medium according toclaim 9, wherein said detecting step detects the jam based on a signalreceived from the printer.
 11. A memory medium according to claim 9,wherein said obtaining step obtains said page number based on a valueentered by an operator.
 12. A memory medium according to claim 9,further comprising an allowing step of allowing an operator to enter aninstruction for printing the document information and the instructionfor duplex printing.
 13. A program comprising machine readable codescomprising: codes for generating print data of a plurality of pagesbased on document information; codes for storing step of storing thegenerated print data; codes for outputting the stored print data with aninstruction for duplex printing to a printer such that all print data ofeither one of even and odd pages in the plurality of pages are printedon one side of at least one recording medium and then all print data ofthe other of the even and odd pages are printed on the other side of theat least one recording medium; codes for detecting jam of a recordingmedium in printing the output print data; codes for obtaining a pagenumber for the recording medium of which said detecting step detectedjam; and codes for resending print data if it is discriminated from theobtained page number that print data have been printed on one side ofthe recording medium for the page number resending the print data thathave been already output to the printer thereby causing the resent printdata to be printed on a recording medium for which no print data havebeen printed on either side.
 14. A program according to claim 13,wherein said codes for detecting detect the jam based on a signalreceived from the printer.
 15. A program according to claim 13, whereinsaid codes for obtaining obtain said page number based on a valueentered by an operator.
 16. A program according to claim 13, the furthercomprising codes for allowing an operator to enter an instruction forprinting document information and the instruction for duplex printing.